package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JiajiaChongzhi;
import com.ruoyi.system.mapper.JiajiaChongzhiMapper;
import com.ruoyi.system.service.IJiajiaChongzhiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 充值栏目Service业务层处理
 * 
 * @author knd
 * @date 2021-10-13
 */
@Service
public class JiajiaChongzhiServiceImpl implements IJiajiaChongzhiService
{
    @Autowired
    private JiajiaChongzhiMapper jiajiaChongzhiMapper;

    /**
     * 查询充值栏目
     * 
     * @param id 充值栏目主键
     * @return 充值栏目
     */
    @Override
    public JiajiaChongzhi selectJiajiaChongzhiById(Long id)
    {
        return jiajiaChongzhiMapper.selectJiajiaChongzhiById(id);
    }

    /**
     * 查询充值栏目列表
     * 
     * @param jiajiaChongzhi 充值栏目
     * @return 充值栏目
     */
    @Override
    public List<JiajiaChongzhi> selectJiajiaChongzhiList(JiajiaChongzhi jiajiaChongzhi)
    {
        return jiajiaChongzhiMapper.selectJiajiaChongzhiList(jiajiaChongzhi);
    }

    /**
     * 新增充值栏目
     * 
     * @param jiajiaChongzhi 充值栏目
     * @return 结果
     */
    @Override
    public int insertJiajiaChongzhi(JiajiaChongzhi jiajiaChongzhi)
    {
        return jiajiaChongzhiMapper.insertJiajiaChongzhi(jiajiaChongzhi);
    }

    /**
     * 修改充值栏目
     * 
     * @param jiajiaChongzhi 充值栏目
     * @return 结果
     */
    @Override
    public int updateJiajiaChongzhi(JiajiaChongzhi jiajiaChongzhi)
    {
        return jiajiaChongzhiMapper.updateJiajiaChongzhi(jiajiaChongzhi);
    }

    /**
     * 批量删除充值栏目
     * 
     * @param ids 需要删除的充值栏目主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaChongzhiByIds(String ids)
    {
        return jiajiaChongzhiMapper.deleteJiajiaChongzhiByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除充值栏目信息
     * 
     * @param id 充值栏目主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaChongzhiById(Long id)
    {
        return jiajiaChongzhiMapper.deleteJiajiaChongzhiById(id);
    }
}
